/*
 * IndicePS.h
 *
 *  Created on: 04/05/2011
 *      Author: Pedro
 */

#ifndef INDICESPS_H_
#define INDICESPS_H_

#include <iostream>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <cassert>
#include <set>
#include "EntradaSalida.hpp"
#include "RegistroIP.h"
#include "RegistroIS.h"
#include "RegistroAux.h"
#include "Registro.h"

using namespace std;

class IndicesPS {
private:
	EntradaSalida es;
	set<RegistroIS> indiceIS;
	long buscarHuecoLibre();
public:
	IndicesPS();
	virtual ~IndicesPS();

	void crearIP();
	void insertarIP(Registro,int);
	void eliminarIP(long);
	long buscarClaveP(long);
	void mostrarIP();

	void crearIS();
	void insertarIS(Registro, long);
	int insertarAux(Adult*, long, long);
	void mostrarIS();
	void mostrarAux();
	void mostrarDatos();
	long buscarClaveS(string);
	void borrarIS(long, string);
	EntradaSalida& getES(){return es;}


};

#endif /* INDICEPS_H_ */
